/*
 *解析加密的json字符串
 *
 *@param String 加密的json字符串
 */

(function (window) {
  var decrypt = {
    json: function (str) {
      //区分错误提示
      var newParam1 = str.slice(6);
      var newParam2 = newParam1.slice(0, -4);
      var jsonStr = window.base64Decode(newParam2);
      return jsonStr;

    },
    json2: function (str) {
      var newParam1 = str.slice(5);
      var newParam2 = newParam1.slice(0, -3);
      var jsonStr = window.base64Decode(newParam2);
      return jsonStr;
    }
  }

  window.decrypt = decrypt;
  return decrypt;
})(window);
